Datasets for tests
==================

Two small local NetCDF files and a style to test the TDS2QGIS plugin without a THREDDS server.

Contents
--------

- datasets/netcdf_file_example.nc ("local" in the JSON file)
    4 daily time steps, from 2019-12-28 12:00 to 2019-12-31 12:00 (UTC)
    region: longitude -45 to -40, latitude -25 to -22 (1/12 degree)
    50 depth levels, from 0 to 5728 m
    variables: currents (sw_cur_u, sw_cur_v, with depth), sw_adt, sw_mdt, bathymetry, ...
    Use it to test the animation (Temporal Controller), the depth selection and vector
    variables. Its time units ("days since 1993-01-01 12:00:00") have a reference time
    that is not at 00:00, the case that made the last frame of the animation empty
    before version 2.0.

- datasets/netcdf_file_example2.nc ("local2" in the JSON file)
    1 time step: 2022-07-21 00:00 (UTC)
    region: longitude -53.875 to -31.125, latitude -35.875 to 6.875 (1/4 degree)
    no depth
    variables: sea level anomaly (sw_sla), absolute dynamic topography (sw_adt) and
    their geostrophic currents (u/v components)
    Use it to test a layer with a single time step (not animated).

- styles/sea_level_anomaly.qml
    Style (colors) applied to the layers of both datasets.

- jsonCreate.py
    Creates the datasets configuration file (datasets.json) pointing to these files.

How to test
-----------

1- Run jsonCreate.py. It creates datasets.json in the folder where it is run, with the
   full paths of the files of this folder (run it again if the repository is moved):

       python jsonCreate.py

2- Install the plugin in QGIS (see the README.md of the repository) and click the
   plugin button in the toolbar to open its window.

3- In "Datasets configuration file (JSON)", choose datasets.json and click "Load".
   The first dataset is selected and the boxes are filled with its limits.

4- Choose the dataset, the date range, the region (or check "Use the canvas limits"),
   the depth (if the dataset has depth) and the variables (if none is selected, all
   variables are downloaded).

5- Optionally, choose the "Temp Directory", where the data of the layers is saved.

6- Click "Plot". The layer is added to the "datasets" group of the layers panel.
   With "local" and more than one day in the date range, the Temporal Controller
   panel is opened: click play to animate the 4 time steps.

The files datasets.json and the temporary files (tds2qgis_*.nc) are created only for
the tests and should not be committed.
